<?php


namespace app\plugins\goods\admin\service;


use app\plugins\goods\admin\model\GoodsBrands;
use helper\form\Builder;

class Brands extends \app\admin\service\AdminService
{

    protected function init()
    {
        $this->model = new GoodsBrands();
    }

    public function getHtml(): string
    {
        $html = [
            [//输入框
                'title' => '品牌名称',
                'key'   => 'title',
                'value' => '',
                'tips'  => '请输入',
                'type'  => 'text'
            ],
            [
                'title' => 'LOGO',
                'key'   => 'logo',
                'value' => '',
                'tips'  => '',
                'type'  => 'images'
            ],
            [
                'title' => '描述',
                'key'   => 'description',
                'value' => '',
                'tips'  => '请输入',
                'type'  => 'textarea'
            ],
            [
                'title' => '状态',
                'key'   => 'status',
                'value' => '',
                'tips'  => '请输入',
                'type'  => 'switch',
                'option' => '启用|禁用'
            ],
            [
                'title' => '排序',
                'key'   => 'sort',
                'value' => '',
                'tips'  => '请输入',
                'type'  => 'number'
            ],
        ];

        return (new Builder($html))->getHtml();
    }
}